#region License

/*
  GShield - Game Shield
  Copyright (C) 2006-2007 WaveTech Digital Technologies, Inc.
                                http://www.wtdt.com

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#endregion License

#region Includes

using System;
using System.Windows.Forms;

#endregion

namespace WaveTech.GShield.Manager
{
	public partial class ReportViewer : Form
	{
		private readonly string m_report;

		#region Constructor

		public ReportViewer(string report)
		{
			m_report = report;


			InitializeComponent();
			ConfigureReport();
		}

		public ReportViewer()
		{
			InitializeComponent();
			ConfigureReport();
		}

		#endregion Constructor

		#region Configure Report

		private void ConfigureReport()
		{
			LogTableAdapter.Fill(ReportingDataSet.Log);
		}

		#endregion Configure Report

		#region ReportViewer_Load

		private void ReportViewer_Load(object sender, EventArgs e)
		{
			reportViewer1.LocalReport.ReportEmbeddedResource = m_report;
			reportViewer1.RefreshReport();
		}

		#endregion ReportViewer_Load
	}
}